
describe("MoveFromListController controller", function(){

    var controller = null;
    var objE = {errorCode:'code', errorMessage:'message'};

    beforeEach(function(){

        var t_alertCtrl = App.AlertController.create();
        var t_loadingCtrl = App.LoadingController.create();
        var t_moveHolderCtrl = App.MoveHolderController.create();
        App.MoveFromListController.reopen({

            init:function(){
                this.set('controllers.alert', t_alertCtrl);
                this.set('controllers.loading', t_loadingCtrl);
                this.set('controllers.moveHolder', t_moveHolderCtrl);
            }
        });
        controller = App.MoveFromListController.create();
    });

    it("selectListItem", function(){

        spyOn(controller,'setSourceAccount');
        spyOn(controller, 'transitionTo');

        var account = App.BaseAccount.create();

        controller.selectListItem(account);

        expect(controller.setSourceAccount).toHaveBeenCalledWith(account);
        expect(controller.transitionTo).toHaveBeenCalledWith('move.amount');
    });
});